﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoolCode.Web.Mvc.UI.Grid 
{
    public  class ToolbarButton:IToolbarButton
    {
        public string Name { get; private set; }
        public string Css { get; private set; }
        public Func<string> ClickHandler { get; private set; }

        #region IToolbarButton Members

        public IToolbarButton Named(string value)
        {
            Name = value;
            return this;
        }

        IToolbarButton IToolbarButton.Css(string value)
        {
            Css = value;
            return this;
        }

        public IToolbarButton OnClick(Func<string> func)
        {
            ClickHandler = func;
            return this;
        }

        #endregion
    }
}
